package com.cskaoyan.controller;

import com.cskaoyan.service.UserService;
import com.cskaoyan.vo.BaseRespVo;
import com.cskaoyan.vo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author stone
 * @date 2022/03/31 17:30
 */
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    UserService userService;

    @RequestMapping("query")
    public BaseRespVo query(Integer[] ids) {
        User[] users = userService.queryUsers(ids);
        return BaseRespVo.ok(users);
    }
}
